
function Main()
{
	InitWebGL();
}

 function InitWebGL() 
 {
	Application.Init("Scene");
		
	//	Texture Initialization
	
	var triangle = new Array();
	triangle.push(new Vec4(0.0,0.0, 0.0, 1.0));
	triangle.push(new Vec4(1.0,2.0, 0.0, 1.0));
	triangle.push(new Vec4(2.0,0.0, 0.0, 1.0));
	
	var A = new Vec4(0.1, 0.3, 0.0, 1.0);
	
	g_Image = new Texture();
	g_Image.LoadTexture("ver.png");
	
	
	var view = View.Instantiate(
						new Transform( new Vec4(), new Vec4()),
						new Rect(new Vec4(), new Vec4( Application.WindowWidth, Application.WindowHeight,0.0, 1.0)),
						new ProjectionOrtho(-250,250, -250, 250, 0, 10)
					);
	
	var char = Character.Instantiate(new Transform(new Vec4(100.0, 0.0, 0.0, 1.0), new Vec4(0.20,0.0,0.0,1.0), new Vec4(1.0,1.0,1.0,1.0)));
	var char2 = Character.Instantiate(new Transform(new Vec4(100.0, 0.0, 0.0, 1.0), new Vec4(0.20,0.0,0.0,1.0), new Vec4(1.0,1.0,1.0,1.0)));
	
	char2.m_Entity.m_Father=char;
	Mouse.MouseDragHandlers.push(new Method( view, view.Move));
	
	
	Application.Update();
	window.setInterval("Application.Update()",10);
}
